package com.guoxin.chapter4.reentractlock.lockmethodtest2.test2;

public class Run {
	public static void main(String[] args) throws InterruptedException {
		Service service = new Service();
		Runnable runnable = new Runnable() {
			public void run() {
				service.waitMethod();
			}
		};
		
		Thread [] threads =new Thread[10];
		for(int i=0;i<10;i++){
			threads[i] = new Thread(runnable);
		}
		
		for(int i=0;i<10;i++){
			threads[i].start();
		}
		
		Thread.sleep(2000);
		service.notityMethod();
	}
}
